import type { DSLWidget } from "../../../types";

export const inputDsl = {
  widgetName: "MainContainer",
  backgroundColor: "none",
  rightColumn: 1080,
  snapColumns: 64,
  detachFromLayout: true,
  widgetId: "0",
  topRow: 0,
  bottomRow: 980,
  containerStyle: "none",
  snapRows: 125,
  parentRowSpace: 1,
  type: "CANVAS_WIDGET",
  canExtend: true,
  version: 34,
  minHeight: 860,
  parentColumnSpace: 1,
  dynamicTriggerPathList: [],
  dynamicBindingPathList: [],
  leftColumn: 0,
  children: [
    {
      widgetName: "Table1",
      defaultPageSize: 0,
      columnOrder: ["id", "name", "'random_header", "Employee.id"],
      isVisibleDownload: true,
      dynamicPropertyPathList: [],
      topRow: 8,
      bottomRow: 53,
      parentRowSpace: 10,
      type: "TABLE_WIDGET",
      parentColumnSpace: 14.62421875,
      dynamicTriggerPathList: [],
      dynamicBindingPathList: [
        { key: "tableData" },
        { key: "primaryColumns.id.computedValue" },
        { key: "primaryColumns.name.computedValue" },
        { key: "primaryColumns.'random_header.computedValue" },
        { key: "primaryColumns.Employee.id.computedValue" },
      ],
      leftColumn: 1,
      primaryColumns: {
        id: {
          index: 0,
          width: 150,
          id: "id",
          horizontalAlignment: "LEFT",
          verticalAlignment: "CENTER",
          columnType: "text",
          textSize: "PARAGRAPH",
          enableFilter: true,
          enableSort: true,
          isVisible: true,
          isDisabled: false,
          isCellVisible: true,
          isDerived: false,
          label: "id",
          computedValue:
            "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.id))}}",
        },
        name: {
          index: 14,
          width: 150,
          id: "name",
          horizontalAlignment: "LEFT",
          verticalAlignment: "CENTER",
          columnType: "text",
          textSize: "PARAGRAPH",
          enableFilter: true,
          enableSort: true,
          isVisible: true,
          isDisabled: false,
          isCellVisible: true,
          isDerived: false,
          label: "name",
          computedValue:
            "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.name))}}",
        },
        "'random_header": {
          index: 20,
          width: 150,
          id: "'random_header",
          horizontalAlignment: "LEFT",
          verticalAlignment: "CENTER",
          columnType: "text",
          textSize: "PARAGRAPH",
          enableFilter: true,
          enableSort: true,
          isVisible: true,
          isDerived: false,
          label: "'random_header",
          computedValue:
            "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.'random_header))}}",
        },
        "Employee.id": {
          index: 20,
          width: 150,
          id: "Employee.id",
          horizontalAlignment: "LEFT",
          verticalAlignment: "CENTER",
          columnType: "text",
          textSize: "PARAGRAPH",
          enableFilter: true,
          enableSort: true,
          isVisible: true,
          isDerived: false,
          label: "Employee.id",
          computedValue:
            "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.Employee.id))}}",
        },
      },
      delimiter: ",",
      derivedColumns: {},
      rightColumn: 63,
      textSize: "PARAGRAPH",
      widgetId: "oclzovhzgx",
      isVisibleFilters: true,
      tableData: '{{users.data.concat({ "\'random header": 100})}}',
      isVisible: true,
      label: "Data",
      searchKey: "",
      version: 1,
      parentId: "0",
      totalRecordCount: 0,
      isLoading: false,
      isVisibleCompactMode: true,
      horizontalAlignment: "LEFT",
      isVisibleSearch: true,
      isVisiblePagination: true,
      verticalAlignment: "CENTER",
      columnSizeMap: {
        task: 245,
        step: 62,
        status: 75,
        email: 261,
      },
    },
  ],
} as unknown as DSLWidget;

export const outputDsl = {
  widgetName: "MainContainer",
  backgroundColor: "none",
  rightColumn: 1080,
  snapColumns: 64,
  detachFromLayout: true,
  widgetId: "0",
  topRow: 0,
  bottomRow: 980,
  containerStyle: "none",
  snapRows: 125,
  parentRowSpace: 1,
  type: "CANVAS_WIDGET",
  canExtend: true,
  version: 34,
  minHeight: 860,
  parentColumnSpace: 1,
  dynamicTriggerPathList: [],
  dynamicBindingPathList: [],
  leftColumn: 0,
  children: [
    {
      widgetName: "Table1",
      defaultPageSize: 0,
      columnOrder: ["id", "name", "_random_header", "Employee_id"],
      isVisibleDownload: true,
      dynamicPropertyPathList: [],
      topRow: 8,
      bottomRow: 53,
      parentRowSpace: 10,
      type: "TABLE_WIDGET",
      parentColumnSpace: 14.62421875,
      dynamicTriggerPathList: [],
      dynamicBindingPathList: [
        { key: "tableData" },
        { key: "primaryColumns.id.computedValue" },
        { key: "primaryColumns.name.computedValue" },
        { key: "primaryColumns._random_header.computedValue" },
        { key: "primaryColumns.Employee_id.computedValue" },
      ],
      leftColumn: 1,
      primaryColumns: {
        id: {
          index: 0,
          width: 150,
          id: "id",
          horizontalAlignment: "LEFT",
          verticalAlignment: "CENTER",
          columnType: "text",
          textSize: "PARAGRAPH",
          enableFilter: true,
          enableSort: true,
          isVisible: true,
          isDisabled: false,
          isCellVisible: true,
          isDerived: false,
          label: "id",
          computedValue:
            "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.id))}}",
        },
        name: {
          index: 14,
          width: 150,
          id: "name",
          horizontalAlignment: "LEFT",
          verticalAlignment: "CENTER",
          columnType: "text",
          textSize: "PARAGRAPH",
          enableFilter: true,
          enableSort: true,
          isVisible: true,
          isDisabled: false,
          isCellVisible: true,
          isDerived: false,
          label: "name",
          computedValue:
            "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.name))}}",
        },
        _random_header: {
          index: 20,
          width: 150,
          id: "_random_header",
          horizontalAlignment: "LEFT",
          verticalAlignment: "CENTER",
          columnType: "text",
          textSize: "PARAGRAPH",
          enableFilter: true,
          enableSort: true,
          isVisible: true,
          isDerived: false,
          label: "'random_header",
          computedValue:
            "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow._random_header))}}",
        },
        Employee_id: {
          index: 20,
          width: 150,
          id: "Employee_id",
          horizontalAlignment: "LEFT",
          verticalAlignment: "CENTER",
          columnType: "text",
          textSize: "PARAGRAPH",
          enableFilter: true,
          enableSort: true,
          isVisible: true,
          isDerived: false,
          label: "Employee.id",
          computedValue:
            "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.Employee_id))}}",
        },
      },
      delimiter: ",",
      derivedColumns: {},
      rightColumn: 63,
      textSize: "PARAGRAPH",
      widgetId: "oclzovhzgx",
      isVisibleFilters: true,
      tableData: '{{users.data.concat({ "\'random header": 100})}}',
      isVisible: true,
      label: "Data",
      searchKey: "",
      version: 1,
      parentId: "0",
      totalRecordCount: 0,
      isLoading: false,
      isVisibleCompactMode: true,
      horizontalAlignment: "LEFT",
      isVisibleSearch: true,
      isVisiblePagination: true,
      verticalAlignment: "CENTER",
      columnSizeMap: {
        task: 245,
        step: 62,
        status: 75,
        email: 261,
      },
    },
  ],
};

export const badDsl = {
  widgetName: "MainContainer",
  backgroundColor: "none",
  rightColumn: 1080,
  snapColumns: 64,
  detachFromLayout: true,
  widgetId: "0",
  topRow: 0,
  bottomRow: 980,
  containerStyle: "none",
  snapRows: 125,
  parentRowSpace: 1,
  type: "CANVAS_WIDGET",
  canExtend: true,
  version: 34,
  minHeight: 860,
  parentColumnSpace: 1,
  dynamicTriggerPathList: [],
  dynamicBindingPathList: [],
  leftColumn: 0,
  children: [
    {
      widgetName: "Table1",
      defaultPageSize: 0,
      columnOrder: ["Employee.id"],
      isVisibleDownload: true,
      dynamicPropertyPathList: [],
      topRow: 8,
      bottomRow: 53,
      parentRowSpace: 10,
      type: "TABLE_WIDGET",
      parentColumnSpace: 14.62421875,
      dynamicTriggerPathList: [],
      dynamicBindingPathList: [
        { key: "tableData" },
        { key: "primaryColumns.Employee.id.computedValue" },
      ],
      leftColumn: 1,
      primaryColumns: {
        "Employee.id": {
          "": {
            index: 20,
            width: 150,
            id: "Employee.id",
            horizontalAlignment: "LEFT",
            verticalAlignment: "CENTER",
            columnType: "text",
            textSize: "PARAGRAPH",
            enableFilter: true,
            enableSort: true,
            isVisible: true,
            isDerived: false,
            label: "Employee.id",
            computedValue:
              "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.Employee.id))}}",
          },
        },
      },
      delimiter: ",",
      derivedColumns: {},
      rightColumn: 63,
      textSize: "PARAGRAPH",
      widgetId: "oclzovhzgx",
      isVisibleFilters: true,
      tableData: '{{users.data.concat({ "\'random header": 100})}}',
      isVisible: true,
      label: "Data",
      searchKey: "",
      version: 1,
      parentId: "0",
      totalRecordCount: 0,
      isLoading: false,
      isVisibleCompactMode: true,
      horizontalAlignment: "LEFT",
      isVisibleSearch: true,
      isVisiblePagination: true,
      verticalAlignment: "CENTER",
      columnSizeMap: {
        task: 245,
        step: 62,
        status: 75,
        email: 261,
      },
    },
  ],
} as unknown as DSLWidget;

export const fixedDsl = {
  widgetName: "MainContainer",
  backgroundColor: "none",
  rightColumn: 1080,
  snapColumns: 64,
  detachFromLayout: true,
  widgetId: "0",
  topRow: 0,
  bottomRow: 980,
  containerStyle: "none",
  snapRows: 125,
  parentRowSpace: 1,
  type: "CANVAS_WIDGET",
  canExtend: true,
  version: 34,
  minHeight: 860,
  parentColumnSpace: 1,
  dynamicTriggerPathList: [],
  dynamicBindingPathList: [],
  leftColumn: 0,
  children: [
    {
      widgetName: "Table1",
      defaultPageSize: 0,
      columnOrder: ["Employee_id"],
      isVisibleDownload: true,
      dynamicPropertyPathList: [],
      topRow: 8,
      bottomRow: 53,
      parentRowSpace: 10,
      type: "TABLE_WIDGET",
      parentColumnSpace: 14.62421875,
      dynamicTriggerPathList: [],
      dynamicBindingPathList: [
        { key: "tableData" },
        { key: "primaryColumns.Employee_id.computedValue" },
      ],
      leftColumn: 1,
      primaryColumns: {
        Employee_id: {
          index: 20,
          width: 150,
          id: "Employee_id",
          horizontalAlignment: "LEFT",
          verticalAlignment: "CENTER",
          columnType: "text",
          textSize: "PARAGRAPH",
          enableFilter: true,
          enableSort: true,
          isVisible: true,
          isDerived: false,
          label: "Employee.id",
          computedValue:
            "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.Employee_id))}}",
        },
      },
      delimiter: ",",
      derivedColumns: {},
      rightColumn: 63,
      textSize: "PARAGRAPH",
      widgetId: "oclzovhzgx",
      isVisibleFilters: true,
      tableData: '{{users.data.concat({ "\'random header": 100})}}',
      isVisible: true,
      label: "Data",
      searchKey: "",
      version: 1,
      parentId: "0",
      totalRecordCount: 0,
      isLoading: false,
      isVisibleCompactMode: true,
      horizontalAlignment: "LEFT",
      isVisibleSearch: true,
      isVisiblePagination: true,
      verticalAlignment: "CENTER",
      columnSizeMap: {
        task: 245,
        step: 62,
        status: 75,
        email: 261,
      },
    },
  ],
};
